import redux,{createStore, combineReducers, applyMiddleware} from 'redux';
import { routerReducer } from 'react-router-redux'
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger';
import rootReducer from './reducer';
const loggerMiddleware = createLogger();
const createStoreWithMiddleware = applyMiddleware(
    thunkMiddleware,
    loggerMiddleware
)(createStore);
const rootR = combineReducers({
    rootReducer,
    routing: routerReducer
});
export default function configStore(initState){
    return createStoreWithMiddleware(rootR,initState)
};